package com.kaifamiao.methods;

class Customer {
    public String name;
    public char gender;
}

public class Doctor {

    public void change( Customer c ) {
        if( c.gender == '男' ) {
            c.gender = '女';
        } else if( c.gender == '女' ){
            c.gender = '男';
        } else {
            System.out.println("尚不明确顾客需求");
        }
    }

    public static void main(String[] args) {

        Customer c = new Customer();
        c.name = "某星";
        c.gender = '男';

        Doctor d = new Doctor();
        // main 调用 d 的 change 方法 改变 c 的性别
        d.change( c );

        System.out.println( c.name + ", " + c.gender );
    }
}
